<template>
	<view class="mainpadding">
		<view class="" >
			<view class="">
				<u-swiper :list="dataAll.images_text" imgMode="heightFix" height="340" indicator circular></u-swiper>

				<view class="mainpadding ffffff" style="border-radius: 0 0 24rpx 24rpx;">
					<view class="flexbetween xiahuaxian ">
						<view class="titletext xiaohei fonweight">{{dataAll.name}}</view>
					</view>
					<view class="flexbetween margin_top">
						<view class="">
							<text class="sanshier bold xiaohong margin_right3">￥{{dataAll.price}}</text>
							<text class="xiaohui strongtext zhonghuax">￥{{dataAll.market_price}}</text>
						</view>
						<!-- <u-number-box button-size="36" color="#000000" bgColor="#F7F7F7" iconStyle="color: #fff"
							v-model="number"></u-number-box> -->
					</view>
				</view>
			</view>
			<!--  活动详情-->
			<view class="mainpadding_top ffffff" style="border-radius:24rpx;">
				<view class="flexleft">
					<view class="allline margin_right1"></view>
					<view class="sanshier xiaohei fonweight">商品详情</view>
				</view>
				<view class="margin_top">
					<u-parse :content="dataAll.content"></u-parse>
				</view>
			</view>
		</view>
		<!-- <view class="gudingdb ffffff mainpadding flexbetween">
			<view class="flexcolumn" @click="jumpurl('/pages/index/shangchneg')">
				<u-icon name="gift" color="#333" size="28"></u-icon>
				<view class="zhonghei ershil margin_top1 ">商城</view>
			</view>
			<view class="ljbmbtn flexcenter" @click="duihuan()">立即购买</view>
		</view> -->
	</view>
</template>

<script>
	const httpRequest = require("@/common/httpRequest.js")
	export default {
		data() {
			return {
				listid: "",
				dataAll: {},
				number: 1,
			}
		},
		onLoad(options) {
			this.listid = options.id
			this.getDetail()
		},
		methods: {
			getDetail() {
				httpRequest.request('/api/goodscl/goodsDetail', 'GET', {
					goods_id: this.listid,
				}).then(res => {
					res.data.content = res.data.content ? res.data.content.replace(/\<img/gi,
						'<img style="display:block" ') : "";
					this.dataAll = res.data
				}).catch(err => {})
			},
			duihuan() {
				// if (!httpRequest.checkIsLogin()) {
				// 	uni.navigateTo({
				// 		url: "/pages/login"
				// 	})
				// 	return false
				// }
				// let data = [{
				// 		goods_id: this.listid,
				// 		number: this.number
				// 	}]
				// uni.navigateTo({
				// 	url: '/pages/qingfuli/querendd?msg=' + encodeURIComponent(JSON.stringify(data))
				// })
			},
		}
	}
</script>

<style lang="scss" scoped>
	/deep/.u-number-box__minus {
		background-color: #FDE7E7 !important;
	}

	/deep/.u-number-box__plus {
		background-color: #FFDECB !important;
	}

	/deep/.uicon-minus {
		color: #000000 !important;
	}

	/deep/.uicon-plus {
		color: #000000 !important;
	}

	.ljbmbtn {
		width: 266rpx;
		height: 88rpx;
		font-weight: 500;
		font-size: 32rpx;
		color: #FFFFFF;
		background: #FF4609;
		border-radius: 8rpx 8rpx 8rpx 8rpx;
	}
</style>